package com.whmskj.xjlhsc.gongweiji.produce.mapper;

import com.whmskj.xjlhsc.gongweiji.produce.pojo.dto.CompletionRateDTO;
import com.whmskj.xjlhsc.gongweiji.produce.pojo.dto.DailyDTO;
import com.whmskj.xjlhsc.gongweiji.produce.pojo.dto.DetailDailyDTO;
import com.whmskj.xjlhsc.gongweiji.produce.pojo.entity.Varieyies;
import com.whmskj.xjlhsc.gongweiji.produce.pojo.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface GWJProductionMapper {
    List<DailyVO> daily(DailyDTO dto);

    @Select("select workshop AS value from sb02EquipmentCounterAccount GROUP BY workshop")
    List<WorkshopVO> getWorkshopList();

    List<MonthDetailVOList> getMonthList(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("process") String process);

    @Select("select c.varieties AS value from sb02EquipmentCounterAccount sb INNER join catalogueOfGy02Stations c on sb.id = c.mesid WHERE sb.process = #{process} GROUP BY c.varieties")
    List<Varieyies> processVariety(String process);

    List<CompletionRateVO> getCompletionRate(CompletionRateDTO dto);

    List<ConversionRateVO> getConversionRate(@Param("variety") String variety, @Param("process") String process, @Param("month") String month);

    List<DetailDailyVo> getDetailDaily(DetailDailyDTO dto);
}
